/** 
 * @Title:统计报表 
 * @Desription:图形报表统计对象组VO
 * @Company:CSN
 * @ClassName:ReportGroupVo.java
 * @Author:Mengfh
 * @CreateDate:2013-11-15   
 * @UpdateUser:Mengfh
 * @Version:0.1 
 *    
 */ 

package com.midian.model.common.vo.report;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.midian.common.utils.ChartHelper;

/** 
 * @ClassName: ReportGroupVo 
 * @Description: 图形报表统计对象组VO
 * @author: Mengfh
 * @date: 2013-11-15
 * 
 */
public class ReportGroupVo implements Serializable {
	
	private static final long serialVersionUID = -1776560003134047205L;
	/**统计对象组名称*/
	private String groupName;
	/**统计对象组颜色*/
	private String color;
	/**统计对象组报表类型(使用ChartHelper的常量进行设置)*/
	private String groupType;
	/**是否将数值为零的数据转换为空*/
	private Boolean isZeroToNull;
	/**是否隐藏组*/
	private Boolean visible = true;
	/**统计对象列表*/
	private List<ReportVo> reportVoList;
	
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	/**
	 * 颜色获取
	 * @return
	 */
	public String getColor() {
		//如果没有设置组颜色，根据指定的默认组名称设置组颜色
		if(StringUtils.isBlank(this.color) && this.groupName != null) {
			if(ChartHelper.GROUPNAME_ALL.equals(this.groupName)) {
				this.color = ChartHelper.COLOR_ALL; //总体颜色设置
			} else if(ChartHelper.GROUPNAME_LEVELONE.equals(this.groupName)) {
				this.color = ChartHelper.COLOR_LEVELONE; //1级颜色设置
			} else if(ChartHelper.GROUPNAME_LEVELTWO.equals(this.groupName)) {
				this.color = ChartHelper.COLOR_LEVELTWO; //2级颜色设置
			} else if(ChartHelper.GROUPNAME_LEVELTHREE.equals(this.groupName)) {
				this.color = ChartHelper.COLOR_LEVELTHREE; //3级颜色设置
			} else if(ChartHelper.GROUPNAME_TECH.equals(this.groupName)) {
				this.color = ChartHelper.COLOR_TECH; //技术类颜色设置
			} else if(ChartHelper.GROUPNAME_STAN.equals(this.groupName)) {
				this.color = ChartHelper.COLOR_STAN; //规范类颜色设置
			}
		}
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getGroupType() {
		return groupType;
	}
	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}
	public Boolean getIsZeroToNull() {
		return isZeroToNull;
	}
	public void setIsZeroToNull(Boolean isZeroToNull) {
		this.isZeroToNull = isZeroToNull;
	}
	public Boolean getVisible() {
		return visible;
	}
	public void setVisible(Boolean visible) {
		this.visible = visible;
	}
	public List<ReportVo> getReportVoList() {
		return reportVoList;
	}
	public void setReportVoList(List<ReportVo> reportVoList) {
		this.reportVoList = reportVoList;
	}
}
